package com.singletonapps.evory.dto;

import java.util.Date;

import com.singletonapps.evory.entities.CourseTema;

public class CourseTemaDto {

	private Long id;
	private CourseDto curso;
	private String nombreTema;
	private String descTema;
	private Date dateCreated;
	private Date dateUpdated;
	private int version;
	
	
	public CourseTemaDto() {
		super();
	}

	public CourseTemaDto(Long id, CourseDto curso, String nombreTema,
			String descTema, Date dateCreated, Date dateUpdated, int version) {
		super();
		this.id = id;
		this.curso = curso;
		this.nombreTema = nombreTema;
		this.descTema = descTema;
		this.dateCreated = dateCreated;
		this.dateUpdated = dateUpdated;
		this.version = version;
	}
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public CourseDto getCurso() {
		return curso;
	}
	public void setCurso(CourseDto curso) {
		this.curso = curso;
	}
	public String getNombreTema() {
		return nombreTema;
	}
	public void setNombreTema(String nombreTema) {
		this.nombreTema = nombreTema;
	}
	public String getDescTema() {
		return descTema;
	}
	public void setDescTema(String descTema) {
		this.descTema = descTema;
	}
	public Date getDateCreated() {
		return dateCreated;
	}
	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}
	public Date getDateUpdated() {
		return dateUpdated;
	}
	public void setDateUpdated(Date dateUpdated) {
		this.dateUpdated = dateUpdated;
	}
	public int getVersion() {
		return version;
	}
	public void setVersion(int version) {
		this.version = version;
	}
	
	public CourseTema toEntity(){
		CourseTema entity = new CourseTema();
		entity.setId(this.id);
		entity.setCurso(this.curso.toEntity());
		entity.setNombreTema(this.nombreTema);
		entity.setDescTema(this.descTema);
		entity.setDateCreated(this.dateCreated);
		entity.setDateUpdated(this.dateUpdated);
		entity.setVersion(this.version);
		return entity;
	}
	
}
